﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.Json;
using System.Threading.Tasks;
using System.Windows.Forms;
using DevTool.Command;
namespace DevTool.Contraner
{
    public partial class UserJsonControl : UserControl
    {
        public UserJsonControl()
        {
            InitializeComponent();
        }

        private void bt_json_Click(object sender, EventArgs e)
        {
            var txt = this.richTextBox_json.Text.Trim();

            if (!string.IsNullOrEmpty(txt))
            {
                try
                {
                    this.richTextBox_json.Text = txt.ConvertJsonString();
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
            }
        }

    }
}
